#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>

#include<string>

using namespace std;


void func(const string s)
{
	string::const_iterator it = s.begin();
}


int main()
{
	string s1("abcdefghxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxyyyyyyyyyyyyyyyyyyyyyyyyy");
	func(s1);

	string s2(s1);
	cout << s2 << endl;

	string s3(s1, 5, 2);
	cout << s3 << endl;

	string s4(s1, 6);
	cout << s4 << endl;

	string s5(s1, 6, s1.size() - 6);
	cout << s5 << endl;

	string s6(10, 'a');
	cout << s6 << endl;

	string s7(s6.begin(), s6.end());
	cout << s7 << endl;

	cout << s7.length() << endl;
	cout << s7.size() << endl;

	/*string s7(s6.begin(), s6.end());
	cout << s7 << endl;*/

	/*string s1("abcdefgh");
	auto it = s1.rbegin();
	while (it != s1.rend())
	{
		cout << *it << " ";
		it++;
	}*/
	return 0;
}


//int main()
//{
//	string s1("abcdefgh");
//	for (auto ch : s1)
//	{
//		cout << ch << " ";
//	}
//	cout << endl;
//}